﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="scripts\TraverseMatrix.js"></script>
</head>
<body>
    <script type="text/javascript">

        var matrix = [
                     [1, 2, 3, 4, 5],
                     [2, 1, 4, 4, 4],
                     [1, 3, 4, 3, 4],
                     [3, 4, 4, 1, 2],
                     [2, 1, 4, 3, 5]];

        var inPoint = new Point(1, 1);
        var outPoint = new Point(1, 2);

        //var directions = [Direction.Top, Direction.Right, Direction.Down];

        var directions = getDirections(inPoint, outPoint);

        var resultMatrix = TraverseAndMarkFieldsForDeleting(matrix, new Point(1, 2), directions);

        for (var row = 0; row < resultMatrix.length; row++) {
            var line = "";
            for (var col = 0; col < resultMatrix[row].length; col++) {
                line += resultMatrix[row][col];
            }
            console.log(line)
        }

        //console.log(resultMatrix);
    </script>
</body>
</html>
